package com.runvp.common.model.vo.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.runvp.common.annotation.Excel;
import com.runvp.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单对象 biz_order
 *
 * @author runvp
 * @date 2022-09-21
 */
@ToString
@Getter
@Setter
public class BizOrderVO extends BaseEntity {

    private static final long serialVersionUID = -7475744472070049620L;

    /**
     * 需要转换的字段集合
     */
    public static String CONVERT_COLUMN = "couponAmount,goodsPrice,goodsDiscountPrice,payAmount,amount";

    /** ID */
    private Long id;

    /** 租户标识 */
    @Excel(name = "租户标识")
    private Long tenantId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 支付交易号 */
    @Excel(name = "支付交易号")
    private String tranNo;

    /** 订单类型 */
    @Excel(name = "订单类型",dictType = "orderType")
    private String type;

    /** 客户ID */
    @Excel(name = "客户ID")
    private Long customerId;

    /** 客户账号 */
    @Excel(name = "客户账号")
    private String customerAccount;

    /** 客户手机号 */
    @Excel(name = "客户手机号")
    private String customerPhone;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;

    /** 设备类型 */
    @Excel(name = "设备类型",dictType = "deviceType")
    private String deviceType;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceSn;
    /** 设备出液口 */
    @Excel(name = "设备出液口")
    private String devicePort;
    /** 设备折扣(%) */
    @Excel(name = "设备折扣(%)")
    private String deviceDiscount;

    /** 场地ID */
    @Excel(name = "场地ID")
    private Long siteId;

    /** 场地名称 */
    @Excel(name = "场地名称")
    private String siteName;

    /** 场地位置 */
    @Excel(name = "场地位置")
    private String sitePosition;

    /** 购买完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "购买完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date successTime;

    /** 优惠券ID */
    @Excel(name = "优惠券ID")
    private Long couponId;

    /** 优惠卷标题 */
    @Excel(name = "优惠卷标题")
    private String couponTitle;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal couponAmount;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品价格选项ID */
    @Excel(name = "商品价格选项ID")
    private Long goodsPriceId;

    /** 商品原价 */
    @Excel(name = "商品原价/元")
    private BigDecimal goodsPrice;

    /** 商品折扣价 */
    @Excel(name = "商品折扣价/元")
    private BigDecimal goodsDiscountPrice;

    /** 锁定时长/秒 */
    @Excel(name = "锁定时长/秒")
    private Long goodsPriceLockTime;

    /** 订单脉冲总量 */
    @Excel(name = "订单脉冲总量")
    private Long goodsPulseNum;

    /** 订单金额 */
    @Excel(name = "订单金额/元")
    private BigDecimal amount;
    /** 重量 */
    @Excel(name = "订单重量/g")
    private BigDecimal weight;
    /** 支付类型 */
    @Excel(name = "支付类型",dictType = "payChannel")
    private String payType;

    /** 支付金额 */
    @Excel(name = "支付金额/元")
    private BigDecimal payAmount;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    /** 是否已分成 */
    @Excel(name = "是否已分成",dictType = "yesOrNo")
    private String shareStatus;

    /** 订单支付状态 */
    @Excel(name = "订单支付状态",dictType = "orderPayStatus")
    private String payStatus;

    /** 订单状态 */
    @Excel(name = "订单状态",dictType = "orderStatus")
    private String status;

    /** 来源 */
    @Excel(name = "来源",dictType = "dataSource")
    private String source;

}
